package com.zhongli.devplatform.mapper.operation;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhongli.devplatform.po.common.ReadCommitOperationPO;
import com.zhongli.devplatform.vo.student.CommitOperationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author WuXiCheng
 * @version 1.0
 * @date 2020/7/23 10:12
 */
@Mapper
public interface ReadCommitOperationMapper extends BaseMapper<ReadCommitOperationPO> {
    /**
     * 获取单个学生提交的作业信息
     * @param studentId
     * @param operationId
     * @return
     */
    CommitOperationVO getCommitOperation(@Param("studentId") Integer studentId, @Param("operationId") Integer operationId);

    /**
     * 统计学生提交的作业数量
     * @param operationId
     * @return
     */
    int countCommit(@Param("operationId") Integer operationId);

    /**
     * 统计老师还未批改的作业数量
     * @param currentUserId
     * @return
     */
    int getUnCheckCount(@Param("currentUserId") Integer currentUserId);
}